Repository navigation
fix(website): render the changelog after a client-side navigation - #24
Merged
Merged
Conversation
Reaching /docs/changelog/ through a <Link>, or using its filters, left the page empty: Rolldown put the release notes in a chunk that imports the changelog's chunk back, so the version list, built when the module loaded, read the notes before they were initialized ("Cannot read properties of undefined"). The page now reads the notes from its own module and builds the list when it renders.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In production, going to
/docs/changelog/through a<Link>(the header, the sidebar, the version menu) leaves the page empty. The same happens when you click a filter after loading the page directly. Opening the URL directly works, because that HTML is prerendered.Cause
Since the move to Vite 8 (#23), the release notes and the changelog page ended up in two client chunks that import each other. Rolldown places shared modules differently from Rollup.
var) was stillundefined, so the build threwTypeError: Cannot read properties of undefined (reading '2.0.0-beta.3').Fix
__RELEASES__in its own module. The separaterelease-notes.tsis gone, and with it the import cycle.Checks
build.types,lintand the full SSG build pass inwebsite/, andfmt.checkpasses.<Link>through every page, including the changelog and the three v1 pages through the version menu, works with no console errors.